﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PipeHitter;

namespace ClientTest
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Connecting Pipe Client.. Type Message to send down pipe and hit Enter.");
            var message = "Z";
            var pipe = new PipeClient("jomomaspipe");
            while (message != "X")
            {
                try
                {
                    message = Console.ReadLine();
                    Console.WriteLine("Sending: " + message);
                    var resp = pipe.SendMessage(message);
                    Console.WriteLine("Response: " + resp);
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Exception " + ex.Message);
                }
            }

        }
    }
}
